#include "drawer.h"
#include "game.h"
#include "object.h"
#include "scene.h"
#include <ctime>
#include <iostream>
#include <tuple>
#include "input.h"

using namespace std;

extern SDL_Surface* screen;
CScene OScene;
CInput OInput;

#undef main
int main() {
    CDrawer OMainDrawer (&OScene);
    OScene.assignDrawer(&OMainDrawer);
    OInput.assignScene(&OScene);
    OMainDrawer.initDrawer();

    while(OScene.getEscaped() != 10 && !OScene.gameOver()) {
        SDL_FillRect(screen,NULL,0xFF000000);
        OScene.doAll();        
        OMainDrawer.drawAll();
        SDL_Delay(30);

    }    
    cout << OScene.numCreeps() << endl;

    SDL_Quit();
    return 0;
}

